Skip to content

Commit

Permalink
Improved the mobile view a lot
Browse files Browse the repository at this point in the history
  • Loading branch information
Pdzly committed Dec 14, 2023
1 parent edb154b commit 5aea49a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import cx from 'classnames';

import Header from '@/components/header';
import BottomNav from '@/components/bottom-nav';
import { ThemeProvider } from '@/utils/TailwindMaterial';

import { ThemeProvider } from '@/components/TailwindMaterial';

const inter = Inter({ subsets: ['latin'] });

Expand Down
8 changes: 4 additions & 4 deletions src/app/user/page.tsx → src/app/user/[userslug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { PersonBio, PersonHeader } from '@/components/person-detail';
import MainCard from '@/components/main-card';
import { ModeratesList, ModeratesProps } from '@/components/moderates-list';
import { PersonDetailSelection } from '@/components/person-comments-posts';
import * as testData from '../../../test-person-data.json';
import * as testData from '../../../../test-person-data.json';

const User = () => (
<div>
<div className="mb-12">
<MainCard>
<div className="flex">
<div className="w-8/12 lg:w-9/12 relative mr-16">
<div className="flex sm:flex-col md:flex-row">
<div className="w-full md:w-8/12 relative mr-16">
<PersonHeader
avatar={testData.person_view.person.avatar}
is_admin={testData.person_view.is_admin}
Expand All @@ -21,7 +21,7 @@ const User = () => (
/>
<PersonBio bio={testData.person_view.person.bio} />
</div>
<div className="w-4/12 lg:w-3/12 relative">
<div className="mt-8 sm:w-full md:mt-0 md:w-4/12 relative">
<ModeratesList moderates={testData.moderates as ModeratesProps[]} />
</div>
</div>
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/components/moderates-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const ModeratesListItem = (props: ModeratesListItemProps) => {
{communityAvatar && (
<Image
src={communityAvatar}
className="hidden lg:flex rounded-md h-32 w-32 mr-2"
className="rounded-md h-32 w-32 mr-2"
alt="Avatar"
width={32}
height={32}
Expand All @@ -39,7 +39,7 @@ export interface ModeratesProps {
}

export const ModeratesList = ({ moderates }: { moderates: ModeratesProps[] }) => (
<div className="w-full border-l-2 pl-16 ">
<div className="w-full border-l-2 pl-16">
<H1 className="mb-4 border-collapse border-b dark:border-gray-400 border-gray-800">Moderates:</H1>
<div className="max-h-500 overflow-y-scroll">
{moderates.map(moderate => (
Expand Down
4 changes: 2 additions & 2 deletions src/components/person-comments-posts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
TabsBody,
Tab,
TabPanel
} from '@/utils/TailwindMaterial';
} from '@/components/TailwindMaterial';

const tabs = [
{ label: 'Posts', value: 'posts' },
Expand All @@ -29,7 +29,7 @@ export const PersonDetailSelection = () => (
</TabsHeader>
<TabsBody>
{tabs.map(({ value }) => (
<TabPanel key={value} value={value} className="">
<TabPanel key={value} value={value}>
TODO:
{' '}
{value}
Expand Down
2 changes: 0 additions & 2 deletions src/components/post-header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import React, { useState } from 'react';
import Image from 'next/image';
import Link from 'next/link';
Expand Down
6 changes: 3 additions & 3 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Config } from 'tailwindcss';
import withMT from '@material-tailwind/react/utils/withMT';

const spacing = {
0: '0',
Expand Down Expand Up @@ -32,7 +32,7 @@ const spacing = {
500: '500px'
};

const config: Config = {
const config = withMT({
content: [
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
Expand Down Expand Up @@ -80,6 +80,6 @@ const config: Config = {
}
},
plugins: []
};
});

export default config;

0 comments on commit 5aea49a

Please sign in to comment.