mirror of
https://github.com/System-End/site.git
synced 2026-04-19 20:55:09 +00:00
Fixed stickers page file formating (#1366)
This commit is contained in:
parent
76be590b89
commit
cae41fe37e
1 changed files with 8 additions and 1 deletions
|
|
@ -13,6 +13,13 @@ import { startCase } from 'lodash'
|
||||||
|
|
||||||
const color = '#EC37AD'
|
const color = '#EC37AD'
|
||||||
|
|
||||||
|
function customStartCase(st) {
|
||||||
|
return st
|
||||||
|
.replace(/\.(svg|png)$/, '')
|
||||||
|
.replace(/[_-]+/g, ' ')
|
||||||
|
.replace(/\b\w/g, char => char.toUpperCase());
|
||||||
|
}
|
||||||
|
|
||||||
const StickersPage = ({ stickers = [] }) => [
|
const StickersPage = ({ stickers = [] }) => [
|
||||||
<Box as="main" key="main" sx={{ textAlign: 'center' }}>
|
<Box as="main" key="main" sx={{ textAlign: 'center' }}>
|
||||||
<ForceTheme theme="dark" />
|
<ForceTheme theme="dark" />
|
||||||
|
|
@ -149,7 +156,7 @@ const StickersPage = ({ stickers = [] }) => [
|
||||||
alt={st.split('.')[0]}
|
alt={st.split('.')[0]}
|
||||||
/>
|
/>
|
||||||
<Text as="span" variant="caption" sx={{ fontSize: 2, mt: [2, 3] }}>
|
<Text as="span" variant="caption" sx={{ fontSize: 2, mt: [2, 3] }}>
|
||||||
{startCase(st.replace(/\.(svg|png)/, ''))}
|
{customStartCase(st)}
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue