Skip to content

Commit

Permalink
feat: upgrading deps, retheme with from @edx/brand, pull logo from co…
Browse files Browse the repository at this point in the history
…nfig settings (#104)

* feat: upgrading deps, use logo from @edx/brand

* feat: upgrading peer deps

* feat: pr feedback

* update snapshots and example app

* pull config from AppContext

Co-authored-by: Adam Stankiewicz <[email protected]>
  • Loading branch information
chavesj and adamstankiewicz authored Nov 30, 2020
1 parent 2e75cc9 commit e4d23d3
Show file tree
Hide file tree
Showing 14 changed files with 8,992 additions and 5,651 deletions.
19 changes: 19 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
BASE_URL=localhost:8080
CREDENTIALS_BASE_URL=http://localhost:18150
CSRF_TOKEN_API_PATH=/csrf/api/v1/token
ECOMMERCE_BASE_URL=http://localhost:18130
LANGUAGE_PREFERENCE_COOKIE_NAME=openedx-language-preference
LMS_BASE_URL=http://localhost:18000
LOGIN_URL=http://localhost:18000/login
LOGOUT_URL=http://localhost:18000/login
MARKETING_SITE_BASE_URL=http://localhost:18000
ORDER_HISTORY_URL=localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh
SEGMENT_KEY=null
SITE_NAME=Open edX
USER_INFO_COOKIE_NAME=edx-user-info
LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage
dist
example
node_modules
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ temp
src/i18n/transifex_input.json
temp/babel-plugin-react-intl
/.vscode
module.config.js
45 changes: 28 additions & 17 deletions example/index.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
import 'babel-polyfill';

import React from 'react';
import { render } from 'react-dom';
import { IntlProvider } from '@edx/frontend-platform/i18n';
import ReactDOM from 'react-dom';
import { initialize, getConfig, subscribe, APP_READY } from '@edx/frontend-platform';
import { AppContext, AppProvider } from '@edx/frontend-platform/react';
import Footer from '@edx/frontend-component-footer';

import './index.scss';
import Footer from '../src';

const App = () => (
<div>
<IntlProvider locale="en">
<Footer
onLanguageSelected={() => {}}
supportedLanguages={[
{ label: 'English', value: 'en' },
{ label: 'Español', value: 'es' },
]}
/>
</IntlProvider>
</div>
);
subscribe(APP_READY, () => {
ReactDOM.render(
<AppProvider>
<AppContext.Provider value={{
authenticatedUser: null,
config: getConfig(),
}}>
<Footer
onLanguageSelected={() => {}}
supportedLanguages={[
{ label: 'English', value: 'en' },
{ label: 'Español', value: 'es' },
]}
/>
</AppContext.Provider>
</AppProvider>,
document.getElementById('root'),
);
});

render(<App />, document.getElementById('root'));
initialize({
messages: []
});
8 changes: 6 additions & 2 deletions example/index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
@import "~@edx/paragon/scss/core/core.scss";
@import "../src/footer";
@import "@edx/brand/paragon/fonts";
@import "@edx/brand/paragon/variables";
@import "@edx/paragon/scss/core/core";
@import "@edx/brand/paragon/overrides";

@import "@edx/frontend-component-footer/footer";
Loading

0 comments on commit e4d23d3

Please sign in to comment.