Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
a60a85db
Unverified
Commit
a60a85db
authored
Dec 15, 2022
by
Mike Grabowski
Committed by
GitHub
Dec 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: layout padding/margin & overflow (#5707)
* chore: fix * chore: tweaks
parent
ad2472ea
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
204 additions
and
225 deletions
+204
-225
index.tsx
src/components/Popups/index.tsx
+15
-15
styleds.tsx
src/components/swap/styleds.tsx
+0
-1
App.tsx
src/pages/App.tsx
+112
-130
index.tsx
src/pages/Pool/index.tsx
+77
-79
No files found.
src/components/Popups/index.tsx
View file @
a60a85db
...
@@ -9,14 +9,12 @@ import { AutoColumn } from '../Column'
...
@@ -9,14 +9,12 @@ import { AutoColumn } from '../Column'
import
ClaimPopup
from
'
./ClaimPopup
'
import
ClaimPopup
from
'
./ClaimPopup
'
import
PopupItem
from
'
./PopupItem
'
import
PopupItem
from
'
./PopupItem
'
const
MobilePopupWrapper
=
styled
.
div
<
{
height
:
string
|
number
}
>
`
const
MobilePopupWrapper
=
styled
.
div
`
position: relative;
position: relative;
max-width: 100%;
max-width: 100%;
height:
${({
height
})
=>
height
}
;
margin: 0 auto;
margin:
${({
height
})
=>
(
height
?
'
0 auto;
'
:
0
)}
;
margin-bottom:
${({
height
})
=>
(
height
?
'
20px
'
:
0
)}
;
display: none;
display: none;
${({
theme
})
=>
theme
.
deprecated_mediaWidth
.
deprecated_upToSmall
`
${({
theme
})
=>
theme
.
deprecated_mediaWidth
.
deprecated_upToSmall
`
display: block;
display: block;
padding-top: 20px;
padding-top: 20px;
...
@@ -74,7 +72,8 @@ export default function Popups() {
...
@@ -74,7 +72,8 @@ export default function Popups() {
<
PopupItem
key=
{
item
.
key
}
content=
{
item
.
content
}
popKey=
{
item
.
key
}
removeAfterMs=
{
item
.
removeAfterMs
}
/>
<
PopupItem
key=
{
item
.
key
}
content=
{
item
.
content
}
popKey=
{
item
.
key
}
removeAfterMs=
{
item
.
removeAfterMs
}
/>
))
}
))
}
</
FixedPopupColumn
>
</
FixedPopupColumn
>
<
MobilePopupWrapper
height=
{
activePopups
?.
length
>
0
?
'
fit-content
'
:
0
}
>
{
activePopups
?.
length
>
0
&&
(
<
MobilePopupWrapper
>
<
MobilePopupInner
>
<
MobilePopupInner
>
{
activePopups
// reverse so new items up front
{
activePopups
// reverse so new items up front
.
slice
(
0
)
.
slice
(
0
)
...
@@ -84,6 +83,7 @@ export default function Popups() {
...
@@ -84,6 +83,7 @@ export default function Popups() {
))
}
))
}
</
MobilePopupInner
>
</
MobilePopupInner
>
</
MobilePopupWrapper
>
</
MobilePopupWrapper
>
)
}
</>
</>
)
)
}
}
src/components/swap/styleds.tsx
View file @
a60a85db
...
@@ -12,7 +12,6 @@ export const PageWrapper = styled.div`
...
@@ -12,7 +12,6 @@ export const PageWrapper = styled.div`
padding: 68px 8px 0px;
padding: 68px 8px 0px;
max-width: 480px;
max-width: 480px;
width: 100%;
width: 100%;
height: 100vh;
@media only screen and (max-width:
${({
theme
})
=>
`
${
theme
.
breakpoint
.
md
}
px`
}
) {
@media only screen and (max-width:
${({
theme
})
=>
`
${
theme
.
breakpoint
.
md
}
px`
}
) {
padding-top: 48px;
padding-top: 48px;
...
...
src/pages/App.tsx
View file @
a60a85db
...
@@ -64,29 +64,18 @@ initializeAnalytics(ANALYTICS_DUMMY_KEY, OriginApplication.INTERFACE, {
...
@@ -64,29 +64,18 @@ initializeAnalytics(ANALYTICS_DUMMY_KEY, OriginApplication.INTERFACE, {
isProductionEnv
:
isProductionEnv
(),
isProductionEnv
:
isProductionEnv
(),
})
})
const
AppWrapper
=
styled
.
div
`
display: flex;
flex-flow: column;
align-items: flex-start;
height: 100%;
`
const
BodyWrapper
=
styled
.
div
`
const
BodyWrapper
=
styled
.
div
`
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
width: 100%;
width: 100%;
height: 100%;
padding:
${({
theme
})
=>
theme
.
navHeight
}
px 0px 5rem 0px;
padding: 72px 0px 0px 0px;
align-items: center;
align-items: center;
flex: 1;
flex: 1;
${({
theme
})
=>
theme
.
deprecated_mediaWidth
.
deprecated_upToSmall
`
padding: 52px 0px 16px 0px;
`
}
;
`
`
const
MobileBottomBar
=
styled
.
div
`
const
MobileBottomBar
=
styled
.
div
`
z-index:
${
Z_INDEX
.
sticky
}
;
z-index:
${
Z_INDEX
.
sticky
}
;
position:
sticky
;
position:
fixed
;
display: flex;
display: flex;
bottom: 0;
bottom: 0;
right: 0;
right: 0;
...
@@ -114,10 +103,6 @@ const HeaderWrapper = styled.div<{ transparent?: boolean }>`
...
@@ -114,10 +103,6 @@ const HeaderWrapper = styled.div<{ transparent?: boolean }>`
z-index:
${
Z_INDEX
.
sticky
}
;
z-index:
${
Z_INDEX
.
sticky
}
;
`
`
const
Marginer
=
styled
.
div
`
margin-top: 5rem;
`
function
getCurrentPageFromLocation
(
locationPathname
:
string
):
PageName
|
undefined
{
function
getCurrentPageFromLocation
(
locationPathname
:
string
):
PageName
|
undefined
{
switch
(
true
)
{
switch
(
true
)
{
case
locationPathname
.
startsWith
(
'
/swap
'
):
case
locationPathname
.
startsWith
(
'
/swap
'
):
...
@@ -205,7 +190,6 @@ export default function App() {
...
@@ -205,7 +190,6 @@ export default function App() {
<
ErrorBoundary
>
<
ErrorBoundary
>
<
DarkModeQueryParamReader
/>
<
DarkModeQueryParamReader
/>
<
ApeModeQueryParamReader
/>
<
ApeModeQueryParamReader
/>
<
AppWrapper
>
<
Trace
page=
{
currentPage
}
>
<
Trace
page=
{
currentPage
}
>
<
HeaderWrapper
transparent=
{
isHeaderTransparent
}
>
<
HeaderWrapper
transparent=
{
isHeaderTransparent
}
>
<
NavBar
/>
<
NavBar
/>
...
@@ -317,7 +301,6 @@ export default function App() {
...
@@ -317,7 +301,6 @@ export default function App() {
<
Loader
/>
<
Loader
/>
)
}
)
}
</
Suspense
>
</
Suspense
>
<
Marginer
/>
</
BodyWrapper
>
</
BodyWrapper
>
<
MobileBottomBar
>
<
MobileBottomBar
>
<
PageTabs
/>
<
PageTabs
/>
...
@@ -326,7 +309,6 @@ export default function App() {
...
@@ -326,7 +309,6 @@ export default function App() {
</
Box
>
</
Box
>
</
MobileBottomBar
>
</
MobileBottomBar
>
</
Trace
>
</
Trace
>
</
AppWrapper
>
</
ErrorBoundary
>
</
ErrorBoundary
>
)
)
}
}
src/pages/Pool/index.tsx
View file @
a60a85db
...
@@ -165,7 +165,7 @@ function WrongNetworkCard() {
...
@@ -165,7 +165,7 @@ function WrongNetworkCard() {
const
theme
=
useTheme
()
const
theme
=
useTheme
()
return
(
return
(
<
div
style=
{
{
height
:
'
100vh
'
}
}
>
<>
<
PageWrapper
>
<
PageWrapper
>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
...
@@ -189,7 +189,7 @@ function WrongNetworkCard() {
...
@@ -189,7 +189,7 @@ function WrongNetworkCard() {
</
AutoColumn
>
</
AutoColumn
>
</
PageWrapper
>
</
PageWrapper
>
<
SwitchLocaleLink
/>
<
SwitchLocaleLink
/>
</
div
>
</>
)
)
}
}
...
@@ -263,7 +263,6 @@ export default function Pool() {
...
@@ -263,7 +263,6 @@ export default function Pool() {
return
(
return
(
<
Trace
page=
{
PageName
.
POOL_PAGE
}
shouldLogImpression
>
<
Trace
page=
{
PageName
.
POOL_PAGE
}
shouldLogImpression
>
<
div
style=
{
{
height
:
'
100vh
'
}
}
>
<
PageWrapper
>
<
PageWrapper
>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
...
@@ -342,7 +341,6 @@ export default function Pool() {
...
@@ -342,7 +341,6 @@ export default function Pool() {
</
AutoColumn
>
</
AutoColumn
>
</
PageWrapper
>
</
PageWrapper
>
<
SwitchLocaleLink
/>
<
SwitchLocaleLink
/>
</
div
>
</
Trace
>
</
Trace
>
)
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment