mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-07 23:43:57 +02:00
style: auto-format code
This commit is contained in:
+1
-1
@@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
// You can delete this file if you're not using it
|
// You can delete this file if you're not using it
|
||||||
|
|
||||||
require('prismjs/themes/prism-tomorrow.css');
|
require("prismjs/themes/prism-tomorrow.css")
|
||||||
|
|||||||
@@ -13,15 +13,16 @@ export const SidebarContext = React.createContext<ISidebarContextInterface | nul
|
|||||||
null
|
null
|
||||||
)
|
)
|
||||||
|
|
||||||
export function SidebarProvider({
|
export function SidebarProvider({ children }: ISidebarProviderProps) {
|
||||||
children,
|
|
||||||
}: ISidebarProviderProps) {
|
|
||||||
const [current, setCurrent] = useState(0)
|
const [current, setCurrent] = useState(0)
|
||||||
|
|
||||||
const memoizedContextValue = useMemo(() => ({
|
const memoizedContextValue = useMemo(
|
||||||
current,
|
() => ({
|
||||||
setCurrent,
|
current,
|
||||||
}), [current, setCurrent])
|
setCurrent,
|
||||||
|
}),
|
||||||
|
[current, setCurrent]
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SidebarContext.Provider value={memoizedContextValue}>
|
<SidebarContext.Provider value={memoizedContextValue}>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import styled from "styled-components"
|
import styled from "styled-components"
|
||||||
|
|
||||||
export const ContainerWrapper = styled.div`
|
export const ContainerWrapper = styled.div``
|
||||||
`
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ export function Footer() {
|
|||||||
{` `}
|
{` `}
|
||||||
<a href="https://www.gatsbyjs.org">Gatsby</a>
|
<a href="https://www.gatsbyjs.org">Gatsby</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</Container>
|
</Container>
|
||||||
</SC.FooterWrapper>
|
</SC.FooterWrapper>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Link } from "gatsby"
|
import { Link } from "gatsby"
|
||||||
|
import { darken, lighten } from "polished"
|
||||||
import styled, { css } from "styled-components"
|
import styled, { css } from "styled-components"
|
||||||
import { fontFamily, modularScale } from "../../design/typography"
|
import { fontFamily, modularScale } from "../../design/typography"
|
||||||
import { darken, lighten } from "polished"
|
|
||||||
|
|
||||||
export const ResourceHeaderWrapper = styled.div`
|
export const ResourceHeaderWrapper = styled.div`
|
||||||
border-bottom: 1px solid #dbdbdb;
|
border-bottom: 1px solid #dbdbdb;
|
||||||
|
|||||||
@@ -33,9 +33,7 @@ export function ResourcesLayout({ children }: PropsWithChildren<{}>) {
|
|||||||
<MobileHeader openMenu={openMenu} />
|
<MobileHeader openMenu={openMenu} />
|
||||||
<ResourcesSidebar className={activeMobileMenu ? "is-open" : ""} />
|
<ResourcesSidebar className={activeMobileMenu ? "is-open" : ""} />
|
||||||
<SC.MainContent>
|
<SC.MainContent>
|
||||||
<SC.Container>
|
<SC.Container>{children}</SC.Container>
|
||||||
{children}
|
|
||||||
</SC.Container>
|
|
||||||
</SC.MainContent>
|
</SC.MainContent>
|
||||||
</SC.Main>
|
</SC.Main>
|
||||||
<SC.Overlay
|
<SC.Overlay
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ function generateFile({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function join([head, ...tail]: IFileOrFolder[]): IFileOrFolder[] {
|
function join([head, ...tail]: IFileOrFolder[]): IFileOrFolder[] {
|
||||||
if (!head) { return [] }
|
if (!head) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
const [similarFs, remaining] = partition(
|
const [similarFs, remaining] = partition(
|
||||||
obj => obj.title === head.title && obj.type === head.type,
|
obj => obj.title === head.title && obj.type === head.type,
|
||||||
|
|||||||
Reference in New Issue
Block a user