-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Moved a bunch to `devDependencies` that should've been there in the first place * Dropped `styled-components`; I mostly use MUI for styling, so switching to its default (`emotion`) makes things easier * Who needs tests anyway * Fixed most dependency warnings, rest are tracked in #12
- Loading branch information
Showing
15 changed files
with
1,379 additions
and
2,091 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,10 @@ | ||
/** | ||
* | ||
* {{ properCase componentName }} | ||
* | ||
*/ | ||
{{#if wantMemo}} | ||
import React, { memo } from 'react'; | ||
{{else}} | ||
import * as React from 'react'; | ||
{{/if}} | ||
{{#if wantStyledComponents}} | ||
import styled from 'styled-components/macro'; | ||
{{/if}} | ||
{{#if wantTranslations}} | ||
import { useTranslation } from 'react-i18next'; | ||
import { messages } from './messages'; | ||
{{/if}} | ||
|
||
interface Props {} | ||
|
||
{{#if wantMemo}} | ||
export const {{ properCase componentName }} = memo((props: Props) => { | ||
{{else}} | ||
export function {{ properCase componentName }}(props: Props) { | ||
{{/if}} | ||
{{#if wantTranslations}} | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const { t, i18n } = useTranslation(); | ||
{{/if}} | ||
|
||
return ( | ||
{{#if wantStyledComponents}} | ||
<Div> | ||
{{else}} | ||
<div> | ||
{{/if}} | ||
{{#if wantTranslations}} | ||
{t('')} | ||
{/* {t(...messages.someThing())} */} | ||
{{/if}} | ||
{{#if wantStyledComponents}} | ||
</Div> | ||
{{else}} | ||
</div> | ||
{{/if}} | ||
<> | ||
</> | ||
); | ||
|
||
{{#if wantMemo}} | ||
}); | ||
{{else}} | ||
}; | ||
{{/if}} | ||
|
||
{{#if wantStyledComponents}} | ||
const Div = styled.div``; | ||
{{/if}} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import dayjs from 'dayjs'; | ||
import saveAs from 'file-saver'; | ||
import * as React from 'react'; | ||
import { useStore } from 'react-redux'; | ||
import { serialize } from 'store/saveload'; | ||
|
||
import DownloadIcon from '@mui/icons-material/Download'; | ||
import IconButton, { IconButtonProps } from '@mui/material/IconButton'; | ||
import Tooltip from '@mui/material/Tooltip'; | ||
|
||
function filename(): string { | ||
return dayjs().format('YYYY-MM-DD-HH-mm-ss') + '.ams2career'; | ||
} | ||
|
||
export function Export(props: IconButtonProps) { | ||
const store = useStore(); | ||
return ( | ||
<Tooltip title="Export"> | ||
<IconButton | ||
onClick={() => | ||
saveAs( | ||
new Blob([serialize(store.getState())], { | ||
type: 'application/octet-stream', | ||
}), | ||
filename(), | ||
) | ||
} | ||
{...props} | ||
> | ||
<DownloadIcon /> | ||
</IconButton> | ||
</Tooltip> | ||
); | ||
} |
Oops, something went wrong.