Skip to content

Commit 7d884ea

Browse files
authored
Merge pull request #1395 from w3bdesign/develop
Add padding on mobile
2 parents 9282d30 + c258fec commit 7d884ea

File tree

8 files changed

+18
-17
lines changed

8 files changed

+18
-17
lines changed

src/components/AlgoliaSearch/MobileSearch.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const searchClient = algoliasearch(
1515
const MobileSearch = () => {
1616
const [search, setSearch] = useState<string | null>(null);
1717
const [hasFocus, sethasFocus] = useState<boolean>(false);
18-
return (
19-
<div className="inline mt-4 md:hidden px-1">
18+
return (
19+
<div className="inline mt-4 md:hidden">
2020
<InstantSearch
2121
indexName={process.env.NEXT_PUBLIC_ALGOLIA_INDEX_NAME ?? 'changeme'}
2222
searchClient={searchClient}

src/components/Footer/Footer.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
const Footer = () => (
77
<footer className="w-full bg-white border-t border-gray-200 mt-12">
8-
<div className="container mx-auto px-6 px-1">
8+
<div className="container mx-auto px-6">
99
<div className="py-4">
1010
<div className="text-gray-600 text-center">
1111
&copy; {new Date().getFullYear()} Daniel / w3bdesign

src/components/Footer/Stickynav.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Hamburger from './Hamburger.component';
1111
* Includes mobile menu.
1212
*/
1313
const Stickynav = () => (
14-
<nav id="footer" className="fixed bottom-0 z-50 w-full mt-[10rem] md:hidden px-1">
14+
<nav id="footer" className="fixed bottom-0 z-50 w-full mt-[10rem] md:hidden">
1515
<div className="container flex flex-wrap items-center justify-between px-6 py-3 mx-auto mt-0 md:min-w-96 bg-blue-800">
1616
<Hamburger />
1717
<div

src/components/Header/Header.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const Header = ({ title }: IHeaderProps) => (
2525
key="pagetitle"
2626
/>
2727
</Head>
28-
<div className="container mx-auto px-6 px-1">
28+
<div className="container mx-auto px-6">
2929
<Navbar />
3030
</div>
3131
</>

src/components/Layout/Layout.component.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Imports
12
import { ReactNode, useContext, useEffect } from 'react';
23
import { useQuery } from '@apollo/client';
34

@@ -55,10 +56,10 @@ const Layout = ({ children, title }: ILayoutProps) => {
5556
}, [refetch]);
5657

5758
return (
58-
<div className="flex flex-col min-h-screen w-full mx-auto px-1">
59+
<div className="flex flex-col min-h-screen w-full mx-auto">
5960
<Header title={title} />
6061
{title === 'Hjem' ? (
61-
<main className="flex-1">{children}</main>
62+
<main className="flex-1 px-4 md:px-0">{children}</main>
6263
) : (
6364
<div className="container mx-auto px-6 flex-1">
6465
<PageTitle title={title} />

src/pages/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Components
12
import Hero from '@/components/Index/Hero.component';
23
import DisplayProducts from '@/components/Product/DisplayProducts.component';
34
import Layout from '@/components/Layout/Layout.component';
@@ -22,10 +23,8 @@ const Index: NextPage = ({
2223
products,
2324
}: InferGetStaticPropsType<typeof getStaticProps>) => (
2425
<Layout title="Hjem">
25-
<div className="px-1">
26-
<Hero />
27-
{products && <DisplayProducts products={products} />}
28-
</div>
26+
<Hero />
27+
{products && <DisplayProducts products={products} />}
2928
</Layout>
3029
);
3130

src/pages/kasse.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
// Components
12
import Layout from '@/components/Layout/Layout.component';
23
import CheckoutForm from '@/components/Checkout/CheckoutForm.component';
34

5+
// Types
6+
import type { NextPage } from 'next';
7+
48
const Kasse: NextPage = () => (
59
<Layout title="Kasse">
6-
<div className="px-1">
7-
<CheckoutForm />
8-
</div>
10+
<CheckoutForm />
911
</Layout>
1012
);
1113

src/pages/produkter.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Components
12
import DisplayProducts from '@/components/Product/DisplayProducts.component';
23
import Layout from '@/components/Layout/Layout.component';
34

@@ -21,9 +22,7 @@ const Produkter: NextPage = ({
2122
products,
2223
}: InferGetStaticPropsType<typeof getStaticProps>) => (
2324
<Layout title="Produkter">
24-
<div className="px-1">
25-
{products && <DisplayProducts products={products} />}
26-
</div>
25+
{products && <DisplayProducts products={products} />}
2726
</Layout>
2827
);
2928

0 commit comments

Comments
 (0)