Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
AleemAlam committed Oct 31, 2023
1 parent 64705bd commit a30ef35
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 34 deletions.
2 changes: 1 addition & 1 deletion public/assets/polkasafe-white-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 6 additions & 11 deletions src/components/AppLayout/NavHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// of the Apache-2.0 license. See the LICENSE file for details.

/* eslint-disable no-tabs */
import { ApplayoutIdentityIcon, Dashboard, OptionMenu, PolkasafeWhiteIcon } from '~src/ui-components/CustomIcons';
import { ApplayoutIdentityIcon, Dashboard, OptionMenu } from '~src/ui-components/CustomIcons';
import { CloseOutlined } from '@ant-design/icons';
import Image from 'next/image';
import { Button, Divider, Skeleton, Space } from 'antd';
Expand Down Expand Up @@ -37,6 +37,7 @@ import { useNetworkSelector, useUserDetailsSelector } from '~src/redux/selectors
import { useDispatch } from 'react-redux';
import { logout, setUserDetailsState } from '~src/redux/userDetails';
import { useTheme } from 'next-themes';
import PolkasafeWhiteIcon from '~assets/polkasafe-white-logo.svg';

const RPCDropdown = dynamic(() => import('~src/ui-components/RPCDropdown'), {
loading: () => <Skeleton active />,
Expand Down Expand Up @@ -117,9 +118,9 @@ const NavHeader = ({ className, sidedrawer, setSidedrawer, displayName, isVerifi
rel='noreferrer'
className='custom-link'
>
<span className='flex items-center gap-x-2 text-sm font-medium text-bodyBlue hover:text-pink_primary dark:text-blue-dark-high'>
<span className='dark:hover:text-pink-dark-primary flex items-center gap-x-2 text-sm font-medium text-bodyBlue hover:text-pink_primary dark:text-blue-dark-high'>
<TownHall />
<span> TownHall </span>
<span>TownHall</span>
</span>
</a>
)
Expand All @@ -134,14 +135,8 @@ const NavHeader = ({ className, sidedrawer, setSidedrawer, displayName, isVerifi
rel='noreferrer'
className='custom-link'
>
<span className='flex items-center gap-x-2 text-sm font-medium text-bodyBlue hover:text-pink_primary dark:text-blue-dark-high'>
{theme === 'dark' ? (
<span className='flex items-center justify-center'>
<PolkasafeWhiteIcon className='text-2xl' />
</span>
) : (
<PolkaSafe />
)}
<span className='dark:hover:text-pink-dark-primary flex items-center gap-x-2 text-sm font-medium text-bodyBlue hover:text-pink_primary dark:text-blue-dark-high'>
{theme === 'dark' ? <PolkasafeWhiteIcon className='scale-[1.7]' /> : <PolkaSafe />}
<span>Polkasafe</span>
</span>
</a>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Home/UpcomingEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ const Calendar = styled(StyledCalendar)`
.ant-select-dropdown {
background-color: ${(props) => (props.theme === 'dark' ? '#0d0d0d' : '#fff')} !important;
}
.ant-select-selection-item {
color: ${(props) => (props.theme === 'dark' ? '#fff' : '#0d0d0d')} !important;
}
`;

const UpcomingEvents = ({ className }: Props) => {
Expand Down
12 changes: 6 additions & 6 deletions src/components/OnchainIdentity/IdentityForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ const IdentityForm = ({
)}
</div>
<div className='flex w-full items-end gap-2 text-sm '>
<div className='flex h-10 w-full items-center justify-between rounded-[4px] border-[1px] border-solid border-[#D2D8E0] bg-[#f5f5f5] px-2 dark:border-separatorDark dark:bg-[#1D1D1D]'>
<div className='flex h-10 w-full items-center justify-between rounded-[4px] border-[1px] border-solid border-[#D2D8E0] bg-[#f5f5f5] px-2 dark:border-separatorDark dark:bg-section-dark-overlay'>
<Address
address={address}
isTruncateUsername={false}
Expand Down Expand Up @@ -532,7 +532,7 @@ const IdentityForm = ({
type='info'
showIcon
message={
<span className='text-sm font-medium text-bodyBlue dark:text-blue-dark-high '>
<span className='text-sm font-medium text-bodyBlue'>
{formatedBalance(totalFee.toString(), unit, 2)} {unit} will be required for this transaction.
<span
className='ml-1 cursor-pointer text-xs text-pink_primary'
Expand All @@ -549,7 +549,7 @@ const IdentityForm = ({
<div className='mr-[18px] flex flex-col gap-1 text-sm'>
<span className='flex justify-between text-xs'>
<span className='text-lightBlue dark:text-blue-dark-medium'>Gas Fee</span>
<span className='font-medium text-bodyBlue dark:text-blue-dark-high'>
<span className='font-medium text-bodyBlue'>
{formatedBalance(gasFee.toString(), unit)} {unit}
</span>
</span>
Expand All @@ -561,7 +561,7 @@ const IdentityForm = ({
text={`${formatedBalance(perSocialBondFee.toString(), unit)} ${unit} per social field`}
/>
</span>
<span className='font-medium text-bodyBlue dark:text-blue-dark-high'>
<span className='font-medium text-bodyBlue'>
{formatedBalance(bondFee.toString(), unit)} {unit}
</span>
</span>
Expand All @@ -573,13 +573,13 @@ const IdentityForm = ({
className='ml-1'
/>
</span>
<span className='font-medium text-bodyBlue dark:text-blue-dark-high'>
<span className='font-medium text-bodyBlue'>
{formatedBalance(registerarFee.toString(), unit)} {unit}
</span>
</span>
<span className='flex justify-between text-xs'>
<span className='text-lightBlue dark:text-blue-dark-medium'>Total</span>
<span className='font-medium text-bodyBlue dark:text-blue-dark-high'>
<span className='font-medium text-bodyBlue'>
{formatedBalance(totalFee.toString(), unit, 2)} {unit}
</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Post/Comment/EditableCommentContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ const EditableCommentContent: FC<IEditableCommentContentProps> = (props) => {
<Button
htmlType='button'
onClick={handleCancel}
className='dark:border-borderColorDark mr-2 flex h-[26px] items-center dark:bg-transparent dark:text-white'
className='mr-2 flex h-[26px] items-center dark:border-borderColorDark dark:bg-transparent dark:text-white'
>
<CloseOutlined />
</Button>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Post/Comment/EditableReplyContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,13 @@ const EditableReplyContent = ({ userId, className, commentId, content, replyId,
<Button
htmlType='button'
onClick={handleCancel}
className='dark:border-borderColorDark mr-2 flex items-center dark:bg-transparent dark:text-white'
className='mr-2 flex items-center dark:border-borderColorDark dark:bg-transparent dark:text-white'
>
<CloseOutlined /> Cancel
</Button>
<Button
htmlType='submit'
className='dark:border-borderColorDark flex items-center border-white bg-pink_primary text-white hover:bg-pink_secondary'
className='flex items-center border-white bg-pink_primary text-white hover:bg-pink_secondary dark:border-borderColorDark'
>
<CheckOutlined /> Reply
</Button>
Expand Down Expand Up @@ -674,7 +674,7 @@ const EditableReplyContent = ({ userId, className, commentId, content, replyId,
<Button
htmlType='button'
onClick={() => handleReplyCancel()}
className='dark:border-borderColorDark mr-2 flex items-center dark:bg-transparent dark:text-white'
className='mr-2 flex items-center dark:border-borderColorDark dark:bg-transparent dark:text-white'
>
<CloseOutlined /> Cancel
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ const VotersList: FC<IVotersListProps> = (props) => {
!!votesRes[decision]?.votes?.length &&
votesRes[decision]?.votes.map((voteData: any, index: number) => (
<VoterRow
className={`${index % 2 == 0 ? 'bg-[#FBFBFC] dark:bg-[#161616]' : 'bg-white'} ${index === votesRes[decision]?.votes.length - 1 ? 'border-b' : ''}`}
className={`${index % 2 == 0 ? 'bg-[#FBFBFC]' : 'bg-white'} ${index === votesRes[decision]?.votes.length - 1 ? 'border-b' : ''}`}
key={`${voteData.voter}_${index}`}
currentKey={activeKey}
voteType={voteType}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const VoterRow: FC<IVoterRow> = ({ currentKey, setActiveKey, voteType, voteData,
return voteData?.delegatedVotes?.length > 0 && voteData?.decision !== 'abstain' ? (
<StyledCollapse
className={`${
active ? 'border-t-2 border-pink_primary' : 'border-t-[1px] border-[#D2D8E0] dark:border-separatorDark dark:border-separatorDark'
active ? 'border-t-2 border-pink_primary' : 'border-t-[1px] border-[#D2D8E0] dark:border-separatorDark'
} w-[550px] gap-[0px] rounded-none border-0 ${className}`}
size='large'
expandIconPosition='end'
Expand Down Expand Up @@ -308,7 +308,7 @@ const VoterRow: FC<IVoterRow> = ({ currentKey, setActiveKey, voteType, voteData,
</StyledCollapse>
) : (
<div
className={`w-[552px] border-x-0 border-y-0 border-t border-solid border-[#D2D8E0] px-[10px] py-4 text-sm text-bodyBlue dark:border-separatorDark dark:text-blue-dark-high ${className} dark:bg-section-dark-overlay`}
className={`w-[552px] border-x-0 border-y-0 border-t border-solid border-[#D2D8E0] px-[10px] py-4 text-sm text-bodyBlue dark:border-separatorDark dark:bg-section-dark-overlay dark:text-blue-dark-high ${className}`}
>
<Title />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const VotingForm = ({
className='dark:[&>.ant-select-selection-item]:text-white dark:[&>.ant-select-selector]:bg-section-dark-overlay'
defaultValue={conviction}
suffixIcon={<DownIcon />}
popupClassName='z-[1060]'
popupClassName='z-[1060] dark:border-0 dark:border-none'
>
{convictionOpts}
</Select>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Search/ResultPosts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const ResultPosts = ({ className, postsData, isSuperSearch, postsPage, setPostsP
>
<div
className={`shadow-[0px 22px 40px -4px rgba(235, 235, 235, 0.8)] min-h-[150px] cursor-pointer flex-col rounded-none border-[1px] border-b-[0px] border-solid border-[#f3f4f5] px-9 py-6 hover:border-b-[1px] hover:border-pink_primary max-sm:p-5 ${
index % 2 === 1 && 'bg-[#fafafb]'
} ${index === postsData.length - 1 && 'border-b-[1px]'} max-md:flex-wrap`}
index % 2 === 1 && 'bg-[#fafafb] dark:bg-[#161616]'
} ${index === postsData.length - 1 && 'border-b-[1px]'} dark:border-none max-md:flex-wrap`}
>
<div className='flex items-center gap-2 '>
{post?.proposer_address ? (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Search/SearchErrorsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const SearchErrorsCard = ({
setPeoplePage({ page: 1, totalPeople: 0 });
setIsSuperSearch(true);
}}
className='mt-6 flex items-center justify-center gap-1.5 rounded-[4px] bg-pink_primary text-sm font-medium text-white'
className='mt-6 flex items-center justify-center gap-1.5 rounded-[4px] bg-pink_primary text-sm font-medium text-white dark:border-none'
>
<SuperSearchIcon />
<span>Use Super Search</span>
Expand Down Expand Up @@ -91,7 +91,7 @@ const SearchErrorsCard = ({
setPeoplePage({ page: 1, totalPeople: 0 });
setIsSuperSearch(true);
}}
className='mt-4 flex items-center justify-center gap-1.5 rounded-[4px] bg-pink_primary text-sm font-medium text-white'
className='mt-4 flex items-center justify-center gap-1.5 rounded-[4px] bg-pink_primary text-sm font-medium text-white dark:border-none'
>
<SuperSearchIcon />
<span>Use Super Search</span>
Expand Down
4 changes: 2 additions & 2 deletions src/components/UserProfile/Socials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Socials: FC<ISocialsProps> = (props) => {
classNames={{
input: 'dark:bg-transparent dark:placeholder:text-borderColorDark dark:text-white'
}}
prefix={<LinkOutlined className='dark:text-borderColorDark mr-1.5 text-base text-[rgba(72,95,125,0.2)]' />}
prefix={<LinkOutlined className='mr-1.5 text-base text-[rgba(72,95,125,0.2)] dark:text-borderColorDark' />}
placeholder={`Enter ${strLink} ${strLink === 'Email' ? '' : 'URL'}`}
onChange={(e) => {
const value = e.target.value.trim();
Expand Down Expand Up @@ -80,7 +80,7 @@ const Socials: FC<ISocialsProps> = (props) => {
})}
{errorCheck && (
<Alert
className='dark:bg-borderColorDark mt-4 h-[40px] rounded-[4px] border-none px-5 py-2 text-sm text-bodyBlue outline-none dark:text-white '
className='mt-4 h-[40px] rounded-[4px] border-none px-5 py-2 text-sm text-bodyBlue outline-none dark:bg-borderColorDark dark:text-white '
message={errorCheck}
type='info'
showIcon
Expand Down
2 changes: 1 addition & 1 deletion src/ui-components/DelegationProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const DelegationProfile = ({ username, address, isSearch, className }: Props) =>
};

return username?.length > 0 ? (
<div className={`shadow-[0px 4px 6px rgba(0, 0, 0, 0.08)] flex justify-between rounded-[14px] bg-white dark:bg-section-dark-overlay ${className}`}>
<div className={`shadow-[0px 4px 6px rgba(0, 0, 0, 0.08)] flex justify-between rounded-[14px] bg-white dark:bg-section-dark-overlay ${className} dark:border-none`}>
<div className='flex justify-center gap-[34px] '>
<ImageComponent
src={image}
Expand Down
4 changes: 3 additions & 1 deletion src/ui-components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export const Dropdown = (props: any) => {
<AntdDropdown
{...props}
overlayClassName={`dark:bg-section-dark-overlay dark:border-separatorDark dark:rounded-lg dark:text-white ${
props.theme == 'dark' ? '[&>ul]:bg-section-dark-background [&>ul>li]:text-white' : ''
props.theme == 'dark'
? '[&>ul]:bg-section-dark-background [&>ul>li]:text-white [&>ul>.ant-dropdown-menu-item-selected]:bg-section-dark-background [&>ul>.ant-dropdown-menu-item-selected]:text-[#5A1138] hover:[&>ul>li]:bg-section-dark-background hover:[&>ul>li]:text-pink-dark-primary'
: ''
}`}
>
{props.children}
Expand Down
5 changes: 5 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ module.exports = {
background: '#1C1D1F',
overlay: '#0D0D0D'
}
},
pink: {
dark: {
primary: '#33071E'
}
}
},
screens: {
Expand Down

0 comments on commit a30ef35

Please sign in to comment.