-
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 #2324 from daostack/bugfix/CW-2318-avatar-blinking
Blinking space's letters avatar on loading #2318
- Loading branch information
Showing
4 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
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
25 changes: 25 additions & 0 deletions
25
...HeaderContent/components/HeaderCommonContent/components/ContentWrapper/ContentWrapper.tsx
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,25 @@ | ||
import React, { FC } from "react"; | ||
import { NavLink } from "react-router-dom"; | ||
import { useRoutesContext } from "@/shared/contexts"; | ||
import { useIsTabletView } from "@/shared/hooks/viewport"; | ||
|
||
interface ContentWrapperProps { | ||
className?: string; | ||
commonId: string; | ||
} | ||
|
||
const ContentWrapper: FC<ContentWrapperProps> = (props) => { | ||
const { className, commonId, children } = props; | ||
const isTabletView = useIsTabletView(); | ||
const { getCommonPageAboutTabPath } = useRoutesContext(); | ||
|
||
return isTabletView ? ( | ||
<div className={className}>{children}</div> | ||
) : ( | ||
<NavLink className={className} to={getCommonPageAboutTabPath(commonId)}> | ||
{children} | ||
</NavLink> | ||
); | ||
}; | ||
|
||
export default ContentWrapper; |
1 change: 1 addition & 0 deletions
1
...omponents/HeaderContent/components/HeaderCommonContent/components/ContentWrapper/index.ts
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 @@ | ||
export { default as ContentWrapper } from "./ContentWrapper"; |
1 change: 1 addition & 0 deletions
1
...es/commonFeed/components/HeaderContent/components/HeaderCommonContent/components/index.ts
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 @@ | ||
export * from "./ContentWrapper"; |