-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from sharemindteam/dev
0616 셰어마인드 도메인 배포
- Loading branch information
Showing
106 changed files
with
2,744 additions
and
1,578 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,133 @@ | ||
import React from 'react'; | ||
import backgroundImage from 'assets/background/background.png'; | ||
import backgroundLogoImage from 'assets/background/background_logo.png'; | ||
import backgroundTextImage from 'assets/background/background_text.png'; | ||
import backgroundIconsImage from 'assets/background/background_sub_icons.png'; | ||
import backgroundButtonImage from 'assets/background/background_button.png'; | ||
|
||
import styled from 'styled-components'; | ||
import { Green } from 'styles/color'; | ||
import { Flex } from 'components/Common/Flex'; | ||
import { useNavigate } from 'react-router-dom'; | ||
// | ||
// | ||
// | ||
|
||
interface AppLayoutProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
// | ||
// | ||
// | ||
|
||
const BACKGROUND_LEFT_RIGHT_RATIO = 3; | ||
|
||
const GROUND_HEIGHT = '24rem'; | ||
|
||
const LAYOUT_STYLES = { | ||
width: '100vw', | ||
height: '100vh', | ||
display: 'flex', | ||
backgroundImage: `url(${backgroundImage})`, | ||
backgroundSize: 'cover', | ||
backgroundPosition: 'center', | ||
backgroundRepeat: 'no-repeat', | ||
}; | ||
|
||
const LeftSection = styled.div` | ||
position: relative; | ||
flex: ${BACKGROUND_LEFT_RIGHT_RATIO}; | ||
display: flex; | ||
justify-content: center; | ||
`; | ||
|
||
const RightSection = styled.div` | ||
position: relative; | ||
flex: 1; | ||
flex-direction: column; | ||
`; | ||
|
||
const IconWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
max-width: 40rem; | ||
padding: 0; | ||
@media (min-width: 768px) { | ||
padding: 0 2rem; | ||
} | ||
`; | ||
|
||
const ButtonWrapper = styled.div` | ||
max-width: 40rem; | ||
padding: 0; | ||
@media (min-width: 768px) { | ||
padding: 0 2rem; | ||
} | ||
`; | ||
|
||
const StyledImg = styled.img` | ||
max-width: 100%; | ||
height: auto; | ||
`; | ||
|
||
const BottomGreenBox = styled.div` | ||
position: absolute; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
height: ${GROUND_HEIGHT}; | ||
bottom: 0; | ||
background-color: ${Green}; | ||
`; | ||
|
||
// | ||
// | ||
// | ||
|
||
const AppLayout = ({ children }: AppLayoutProps) => { | ||
const navigate = useNavigate(); | ||
|
||
// | ||
// | ||
// | ||
|
||
return ( | ||
<div style={LAYOUT_STYLES}> | ||
<LeftSection> | ||
<IconWrapper> | ||
<Flex direction="column" gap="1rem" style={{ flex: 1 }}> | ||
<StyledImg src={backgroundTextImage} alt="bg-text" /> | ||
<StyledImg src={backgroundLogoImage} alt="bg-logo" /> | ||
</Flex> | ||
<StyledImg | ||
src={backgroundIconsImage} | ||
alt="bg-icons" | ||
style={{ marginBottom: GROUND_HEIGHT }} | ||
/> | ||
</IconWrapper> | ||
<BottomGreenBox> | ||
<ButtonWrapper> | ||
<StyledImg | ||
src={backgroundButtonImage} | ||
alt="bg-button" | ||
onClick={() => { | ||
navigate('/service'); | ||
}} | ||
/> | ||
</ButtonWrapper> | ||
</BottomGreenBox> | ||
</LeftSection> | ||
<div style={{ flex: 1 }}>{children}</div> | ||
<RightSection> | ||
<BottomGreenBox /> | ||
</RightSection> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AppLayout; |
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 |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import { instance, publicInstance } from './axios'; | ||
|
||
// | ||
// | ||
// | ||
|
||
export const getInstance = async (url: string, params?: any) => { | ||
try { | ||
const data = await instance.get(url, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
export const postInstance = async (url: string, body: any, params?: any) => { | ||
try { | ||
const data = await instance.post(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
export const putInstance = async (url: string, body: any, params: any) => { | ||
try { | ||
const data = await instance.put(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
|
||
export const patchInstance = async (url: string, body?: any, params?: any) => { | ||
try { | ||
const data = await instance.patch(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
|
||
export const deleteInstance = async (url: string, body?: any) => { | ||
try { | ||
const config = { | ||
data: body, | ||
}; | ||
const data = await instance.delete(url, config); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
|
||
// | ||
// | ||
// | ||
|
||
export const getPublicInstance = async (url: string, params?: any) => { | ||
try { | ||
const data = await publicInstance.get(url, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
export const postPublicInstance = async ( | ||
url: string, | ||
body: any, | ||
params?: any, | ||
) => { | ||
try { | ||
const data = await publicInstance.post(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
export const putPublicInstance = async ( | ||
url: string, | ||
body: any, | ||
params: any, | ||
) => { | ||
try { | ||
const data = await publicInstance.put(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
|
||
export const patchPublicInstance = async ( | ||
url: string, | ||
body?: any, | ||
params?: any, | ||
) => { | ||
try { | ||
const data = await publicInstance.patch(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
|
||
export const deletePublicInstance = async (url: string, body?: any) => { | ||
try { | ||
const config = { | ||
data: body, | ||
}; | ||
const data = await publicInstance.delete(url, config); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
|
||
// | ||
// | ||
// |
Oops, something went wrong.