Skip to content

Commit

Permalink
Merge pull request #356 from navikt/uu-document-title
Browse files Browse the repository at this point in the history
Felles standard på document title
  • Loading branch information
otenav authored Mar 4, 2022
2 parents 9cc88f6 + 1694ffd commit 41043c9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions server/common/htmlMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const getEmployer = require('./getEmployer');
const getWorkLocation = require('./getWorkLocation');
const date = require('./date');

const DEFAULT_TITLE = 'Ledige stillinger - Arbeidsplassen - Norges nye jobbsøk';
const DEFAULT_TITLE = 'Ledige stillinger - Arbeidsplassen';
const DEFAULT_DESCRIPTION = 'Søk etter ledige stillinger. Heltid- og deltidsjobber i offentlig og privat sektor i Oslo, Bergen, Trondheim, Stavanger, Tromsø og alle kommuner i Norge.';
const DEFAULT_DESCRIPTION_STILLING = 'Her kan du se hele stillingen, sende søknad eller finne andre ledige stillinger.';

Expand All @@ -17,7 +17,7 @@ exports.getDefaultDescription = function (){

exports.getStillingTitle = function (source){
if(source && source.title) {
return source.title;
return `${source.title} - Arbeidsplassen`;
}
return DEFAULT_TITLE;
};
Expand Down
3 changes: 3 additions & 0 deletions src/rapporterAnnonse/RapporterAnnonse.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {authenticationEnum} from "../authentication/authenticationReducer";
import NotAuthenticated from "../authentication/NotAuthenticated";
import logAmplitudeEvent from "../amplitudeTracker";
import {Textarea} from "nav-frontend-skjema";
import {useDocumentTitle} from "../common/hooks";

const violationCategories = [
{label: "Diskriminerende innhold", key: "discrimination"},
Expand All @@ -42,6 +43,8 @@ const RapporterAnnonse = () => {
const [description, setDescription] = useState('');
const [descriptionLabel, setDescriptionLabel] = useState("Beskrivelse - må fylles ut");

useDocumentTitle('Rapportér annonse - Arbeidsplassen');

useEffect(() => {
if (document.location.search.includes('uuid')) {
setStillingId(document.location.search.split('=')[1]);
Expand Down
2 changes: 1 addition & 1 deletion src/search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Search = ({
});

useTrackPageview(CONTEXT_PATH, 'Ledige stillinger');
useDocumentTitle('Ledige stillinger - Arbeidsplassen - Norges nye jobbsøk');
useDocumentTitle('Ledige stillinger - Arbeidsplassen');

useEffect(() => {
initialSearch();
Expand Down
2 changes: 1 addition & 1 deletion src/stilling/Stilling.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const Stilling = ({error, getStilling, isFetchingStilling, match, stilling, rese

useEffect(() => {
if (stilling && stilling._source && stilling._id && stilling._source.title) {
document.title = stilling._source.title;
document.title = `${stilling._source.title} - Arbeidsplasssen`;

try {
ga('set', 'page', `${CONTEXT_PATH}/stilling/${stilling._id}`);
Expand Down

0 comments on commit 41043c9

Please sign in to comment.