-
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.
* brought site object in to apps page. did some formatting * added icon files and added content to cards * added icons to getIcon, new colour to tailwind * completed styling and added proper orange colour for button, just need global variable now * removed console.logs * added environment variable so that code links to whichever environment you are currently in * clean up code * formatted legacy apps and removed apps that have already gone to production * refactoring as per review * removed hard coded styling from svgs
- Loading branch information
1 parent
b455c1e
commit 1d84f02
Showing
13 changed files
with
197 additions
and
177 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
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
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,21 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
function Mobile({ styling }) { | ||
return ( | ||
<svg | ||
viewBox="0 0 13 20" | ||
xmlns="http://www.w3.org/2000/svg" | ||
className={styling} | ||
> | ||
<path d="M9.59844 0H2.94194C2.19253 0 1.47389 0.305439 0.943964 0.848947C0.413871 1.39263 0.115747 2.13 0.115234 2.89895V17.1011C0.115747 17.87 0.413871 18.6074 0.943964 19.1511C1.47406 19.6946 2.1927 20 2.94194 20H9.59844C10.3475 20 11.066 19.6946 11.5957 19.1509C12.1255 18.6072 12.4231 17.8698 12.4231 17.1011V2.89895C12.4231 2.13018 12.1255 1.39281 11.5957 0.849123C11.066 0.305614 10.3475 0 9.59844 0ZM1.14089 17.0526V3.78947H11.3974V17.0526H1.14089Z" /> | ||
</svg> | ||
) | ||
} | ||
// PROPTYPES | ||
const { string } = PropTypes | ||
Mobile.propTypes = { | ||
styling: string, | ||
} | ||
|
||
export default Mobile |
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,21 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
function PC({ styling }) { | ||
return ( | ||
<svg | ||
viewBox="0 0 24 20" | ||
xmlns="http://www.w3.org/2000/svg" | ||
className={styling} | ||
> | ||
<path d="M3.37197 16.25H9.98833L9.69659 18.3334H7.64529C7.17304 18.3334 6.79058 18.7062 6.79058 19.1667C6.79058 19.6271 7.17304 20 7.64529 20H17.0471C17.5194 20 17.9018 19.6271 17.9018 19.1667C17.9018 18.7062 17.5194 18.3334 17.0471 18.3334H14.9958L14.7041 16.25H21.3204C22.7349 16.25 23.8845 15.1292 23.8845 13.7501V2.49997C23.8845 1.12088 22.7349 0 21.3204 0H3.37175C1.95726 0 0.807617 1.12088 0.807617 2.49997V13.7501C0.807617 15.1292 1.95726 16.25 3.37175 16.25H3.37197ZM13.2704 18.3334H11.4222L11.7139 16.25H12.98L13.2718 18.3334H13.2706H13.2704ZM21.3209 14.5836H3.37197C2.90086 14.5836 2.51726 14.2096 2.51726 13.7503V13.3336H22.1756V13.7503C22.1756 14.2096 21.792 14.5836 21.3209 14.5836ZM3.37197 1.66687H21.3209C21.792 1.66687 22.1756 2.04087 22.1756 2.50019V11.6668H2.51726V2.50019C2.51726 2.04087 2.90086 1.66687 3.37197 1.66687Z" /> | ||
</svg> | ||
) | ||
} | ||
// PROPTYPES | ||
const { string } = PropTypes | ||
PC.propTypes = { | ||
styling: string, | ||
} | ||
|
||
export default PC |
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,21 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
function Tablet({ styling }) { | ||
return ( | ||
<svg | ||
viewBox="0 0 16 20" | ||
xmlns="http://www.w3.org/2000/svg" | ||
className={styling} | ||
> | ||
<path d="M13.9855 0H2.24241C1.23908 0 0.422852 0.821579 0.422852 1.82807V18.1719C0.422852 19.1786 1.23926 20 2.24241 20H13.9879C14.9912 20 15.8075 19.1784 15.8075 18.1719V1.82807C15.805 0.821403 14.9886 0 13.9855 0ZM8.62994 18.6158H7.60038C7.32585 18.6158 7.10361 18.393 7.10361 18.1198C7.10361 17.8467 7.32568 17.6189 7.60038 17.6189H8.62994C8.90446 17.6189 9.12671 17.8418 9.12671 18.1198C9.12671 18.3979 8.90464 18.6158 8.62994 18.6158ZM14.3878 16.7039C14.3878 16.9768 14.1657 17.1998 13.891 17.1998L2.33893 17.2007C2.06441 17.2007 1.84217 16.9779 1.84217 16.7047V2.10596C1.84217 1.82807 2.06423 1.60509 2.33893 1.60509H13.8924C14.167 1.60509 14.3892 1.82789 14.3892 2.10596V16.7039H14.3878Z" /> | ||
</svg> | ||
) | ||
} | ||
// PROPTYPES | ||
const { string } = PropTypes | ||
Tablet.propTypes = { | ||
styling: string, | ||
} | ||
|
||
export default Tablet |
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
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
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,13 @@ | ||
import React from 'react' | ||
|
||
// FPCC | ||
import FVAppsData from 'components/FVApps/FVAppsData' | ||
import FVAppsPresentation from './FVAppsPresentation' | ||
|
||
function FVAppsContainer() { | ||
const { sitesWithApps } = FVAppsData() | ||
|
||
return <FVAppsPresentation sitesWithApps={sitesWithApps} /> | ||
} | ||
|
||
export default FVAppsContainer |
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,19 @@ | ||
import { useSites } from 'common/dataHooks/useSites' | ||
|
||
function FVAppsData() { | ||
const sites = useSites() | ||
|
||
function features(site) { | ||
return site.enabledFeatures.find( | ||
(feature) => feature.key.toLowerCase() === 'has_app', | ||
) | ||
} | ||
|
||
const sitesWithApps = sites?.data?.results?.filter(features) | ||
|
||
return { | ||
sitesWithApps, | ||
} | ||
} | ||
|
||
export default FVAppsData |
Oops, something went wrong.